inherited FNovaPesquisaPedidoVenda: TFNovaPesquisaPedidoVenda
  Left = 306
  Top = 163
  Caption = 'Pesquisa Pedido Venda'
  ClientHeight = 354
  ClientWidth = 502
  FormStyle = fsMDIForm
  OldCreateOrder = True
  Visible = False
  PixelsPerInch = 96
  TextHeight = 13
  object Label4: TLabel [0]
    Left = 56
    Top = 48
    Width = 33
    Height = 13
    Caption = 'C'#243'digo'
  end
  inherited Panel2: TPanel
    Width = 502
    inherited BtnLimpar: TBitBtn
      OnClick = BtnLimparClick
    end
    inherited BtnImprimir: TBitBtn
      Left = 331
      Visible = False
    end
    inherited BtnSelecionar: TBitBtn
      Left = 161
      OnClick = BtnSelecionarClick
    end
    inherited BtnFechar: TBitBtn
      Left = 420
    end
  end
  inherited Panel1: TPanel
    Width = 502
    Height = 313
    object Label1: TLabel [0]
      Left = 4
      Top = 8
      Width = 33
      Height = 13
      Caption = 'C'#243'digo'
    end
    object Label5: TLabel [1]
      Left = 5
      Top = 54
      Width = 56
      Height = 13
      Caption = 'Cliente (F-8)'
    end
    object Label13: TLabel [2]
      Left = 5
      Top = 92
      Width = 46
      Height = 13
      Caption = 'Vendedor'
    end
    object Label32: TLabel [3]
      Left = 251
      Top = 92
      Width = 111
      Height = 13
      Caption = 'Local baixa do Estoque'
    end
    object Label11: TLabel [4]
      Left = 5
      Top = 130
      Width = 86
      Height = 13
      Caption = 'Tipo de Opera'#231#227'o'
    end
    object Label6: TLabel [5]
      Left = 53
      Top = 9
      Width = 42
      Height = 13
      Caption = 'N'#176' Tal'#227'o'
    end
    inherited DBGrid1: TDBGrid
      Top = 187
      Width = 500
      Ctl3D = False
      Font.Charset = ANSI_CHARSET
      Font.Name = 'Times New Roman'
      Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgTabs, dgConfirmDelete, dgCancelOnExit]
      ParentCtl3D = False
      ParentFont = False
      TitleFont.Charset = ANSI_CHARSET
      TitleFont.Name = 'Times New Roman'
      TitleFont.Style = [fsBold]
      OnDblClick = DBGrid1DblClick
      Columns = <
        item
          Alignment = taCenter
          Expanded = False
          FieldName = 'PED_CODIGO'
          Title.Alignment = taCenter
          Title.Caption = 'C'#243'digo'
          Width = 50
          Visible = True
        end
        item
          Alignment = taCenter
          Expanded = False
          FieldName = 'DATA'
          Title.Alignment = taCenter
          Title.Caption = 'Data'
          Width = 65
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'CLIENTE'
          Title.Caption = 'Cliente'
          Width = 210
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'VALOR'
          Title.Alignment = taRightJustify
          Title.Caption = 'Valor'
          Width = 80
          Visible = True
        end
        item
          Alignment = taCenter
          Expanded = False
          FieldName = 'QTD_ITENS'
          Title.Alignment = taCenter
          Title.Caption = 'Qtd Itens'
          Width = 55
          Visible = True
        end>
    end
    inherited Panel3: TPanel
      Top = 292
      Width = 500
    end
    object EdCodigo: TEdit
      Left = 4
      Top = 24
      Width = 46
      Height = 19
      Ctl3D = False
      ParentCtl3D = False
      TabOrder = 2
    end
    object GBData: TGroupBox
      Left = 102
      Top = 1
      Width = 232
      Height = 50
      Caption = '  Data  '
      Ctl3D = False
      ParentCtl3D = False
      TabOrder = 4
      object Label2: TLabel
        Left = 7
        Top = 22
        Width = 14
        Height = 13
        Caption = 'De'
      end
      object Label3: TLabel
        Left = 124
        Top = 22
        Width = 6
        Height = 13
        Caption = #224
      end
      object DTData1: TDateEdit
        Left = 28
        Top = 22
        Width = 90
        Height = 21
        NumGlyphs = 2
        TabOrder = 0
        OnExit = DTData1Exit
      end
      object DTData2: TDateEdit
        Left = 136
        Top = 22
        Width = 90
        Height = 21
        NumGlyphs = 2
        TabOrder = 1
      end
    end
    object RBSituacao: TRadioGroup
      Left = 336
      Top = 0
      Width = 157
      Height = 51
      Caption = '  Situa'#231#227'o  '
      Columns = 2
      Ctl3D = False
      ItemIndex = 3
      Items.Strings = (
        'Em aberto'
        'Encerrado'
        'Cancelado'
        'Todas')
      ParentCtl3D = False
      TabOrder = 5
    end
    object DBLCBCliente: TDBLookupComboBox
      Left = 5
      Top = 69
      Width = 487
      Height = 19
      Hint = '(F3) Visualizar Descri'#231#227'o'
      Ctl3D = False
      KeyField = 'CLI_CODIGO'
      ListField = 'CLI_RAZAO'
      ListSource = DSCliente
      ParentCtl3D = False
      TabOrder = 6
      OnKeyDown = DBLCBClienteKeyDown
    end
    object DBLCBVendedor: TDBLookupComboBox
      Left = 5
      Top = 107
      Width = 243
      Height = 19
      Hint = '(F3) Visualizar Descri'#231#227'o'
      Ctl3D = False
      KeyField = 'VEND_CODIGO'
      ListField = 'VEND_NOME'
      ListSource = DSVendedor
      ParentCtl3D = False
      TabOrder = 7
      OnKeyDown = DBLCBVendedorKeyDown
    end
    object DBLLocalBaixaEstoquePed: TDBLookupComboBox
      Left = 251
      Top = 107
      Width = 240
      Height = 19
      Ctl3D = False
      KeyField = 'LOC_CODIGO'
      ListField = 'LOC_DESCRICAO'
      ListSource = DSLocal
      ParentCtl3D = False
      TabOrder = 8
      OnKeyDown = DBLLocalBaixaEstoquePedKeyDown
    end
    object DBLCBTipoVenda: TDBLookupComboBox
      Left = 5
      Top = 145
      Width = 487
      Height = 19
      Ctl3D = False
      KeyField = 'TIPVEND_CODIGO'
      ListField = 'cod_descricao'
      ListSource = DSTipoVenda
      ParentCtl3D = False
      ParentShowHint = False
      ShowHint = True
      TabOrder = 9
      OnKeyDown = DBLCBTipoVendaKeyDown
    end
    object EdNTalao: TEdit
      Left = 53
      Top = 24
      Width = 46
      Height = 19
      Ctl3D = False
      ParentCtl3D = False
      TabOrder = 3
    end
  end
  inherited QPesquisa: TQuery
    SQL.Strings = (
      ' SELECT'
      '                                       PEDIDOVENDA.PED_CODIGO,'
      
        '                                       PEDIDOVENDA.PED_DATA AS D' +
        'ATA,'
      
        '                                       CLIENTE.CLI_RAZAO AS CLIE' +
        'NTE,'
      'SUM(ITENSPEDIDOVENDA.ITENSPED_VALORTOTAL) AS VALOR,'
      
        '                                       COUNT(ITENSPEDIDOVENDA.IT' +
        'ENSPED_VALORTOTAL) AS QTD_ITENS'
      ''
      '                               FROM PEDIDOVENDA'
      ''
      
        '                                       INNER JOIN ITENSPEDIDOVEN' +
        'DA ON'
      
        '                                               (ITENSPEDIDOVENDA' +
        '.ITENSPED_PEDIDO = PEDIDOVENDA.PED_CODIGO)'
      ''
      
        '                                     INNER JOIN CLIENTE ON      ' +
        '                                         '
      
        '                                             (CLIENTE.CLI_CODIGO' +
        ' = PEDIDOVENDA.PED_CODIGO)              '
      
        '                               WHERE (PEDIDOVENDA.PED_CODIGO > 0' +
        ')'
      ''
      '                               GROUP BY'
      '                                       PEDIDOVENDA.PED_CODIGO,'
      '                                       PEDIDOVENDA.PED_DATA,'
      'CLIENTE.CLI_RAZAO')
    Left = 104
    Top = 281
    object QPesquisaPED_CODIGO: TIntegerField
      FieldName = 'PED_CODIGO'
    end
    object QPesquisaDATA: TDateTimeField
      FieldName = 'DATA'
      DisplayFormat = 'DD/MM/YYYY'
    end
    object QPesquisaCLIENTE: TStringField
      FieldName = 'CLIENTE'
      Size = 60
    end
    object QPesquisaVALOR: TFloatField
      FieldName = 'VALOR'
      DisplayFormat = '0.,00'
    end
    object QPesquisaQTD_ITENS: TIntegerField
      FieldName = 'QTD_ITENS'
    end
  end
  inherited DSPesquisa: TDataSource
    Left = 240
    Top = 265
  end
  object DSLocal: TDataSource
    DataSet = DMGestao.QLocal
    Left = 184
    Top = 232
  end
  object DSVendedor: TDataSource
    DataSet = DMGestao.QVendedor
    Left = 312
    Top = 272
  end
  object DSTipoVenda: TDataSource
    DataSet = QTipoVenda
    Left = 136
    Top = 256
  end
  object DSCliente: TDataSource
    DataSet = DMGestao.QCliente
    Left = 368
    Top = 264
  end
  object QTipoVenda: TQuery
    DatabaseName = 'base'
    SQL.Strings = (
      'Select TipoVenda.*,'
      
        'TIPVEND_CODIGOVENDA || '#39' - '#39' || TIPVEND_DESCRICAO as cod_descric' +
        'ao'
      ' From TipoVenda'
      'order By TIPVEND_CODIGOVENDA')
    Left = 69
    Top = 336
  end
end
